<script type="text/javascript">
head.ready(function(){


//	var data = <?php echo $nd_string ?>;
//  var plot1 = jQuery.jqplot ('nd_chart', [data],
//    {
//      seriesDefaults: {
//        // Make this a pie chart.
//        renderer: jQuery.jqplot.PieRenderer,
//        rendererOptions: {
//          // Put data labels on the pie slices.
//          // By default, labels show the percentage of the slice.
//          showDataLabels: true
//        }
//      },
//      legend: { show:true, location: 'e' }
//    }
//  );


});
</script>

	<h2 class="sepH_b">Thống kê nội dung hoạt động NHĐ - 32 Tỉnh/Thành - quý <?php echo $c_quarter ?>/<?php echo $c_year ?></h2>
<div class="dp50 sortable ui-sortable">
			<div class="box_c">
				<h3 class="box_c_heading cf">
                                    <span class="fl">Tỉnh/Thành triển khai nội dung NHĐ</span>
                                    <img class="fr square_x_11 wRemove" alt="" src="images/blank.gif">
                                    <img class="fr switch_arrows_a wToogle" alt="" src="images/blank.gif">
                                </h3>
				<div class="box_c_content cf">
					<ul class="summary_list">
						<li><span><?php echo $rate["nd1"] ? $rate["nd1"] : "0" ; ?>%</span> Tỉnh/Thành triển khai 1 ND</li>
						<li><span><?php echo $rate["nd2"] ? $rate["nd2"] : "0" ; ?>%</span> Tỉnh/Thành triển khai 2 ND</li>
						<li><span><?php echo $rate["nd3"] ? $rate["nd3"] : "0" ; ?>%</span> Tỉnh/Thành triển khai 3 ND</li>
						<li><span><?php echo $rate["nd4"] ? $rate["nd4"] : "0" ; ?>%</span> Tỉnh/Thành triển khai 4 ND</li>
					</ul>
				</div>
			</div>
</div>

<!--<div class="dp50 sortable ui-sortable">
			<div class="box_c">
				<h3 class="box_c_heading cf">
                                    <span class="fl">Tỉ lệ Tỉnh/Thành triển khai nội dung NHĐ</span>

                                        <img class="fr square_x_11 wRemove" alt="" src="images/blank.gif">
                                        <img class="fr switch_arrows_a wToogle" alt="" src="images/blank.gif">
                                </h3>
				<div class="box_c_content cf">
						<div id="nd_chart" style="height:200px;width:300px; "></div>
			</div>
			</div>
</div>
-->

<div class="dp100">

	<h2 class="sepH_b">Bảng thống kê các nội dung RHM - quý <?php echo $c_quarter ?>/<?php echo $c_year-1 ?> và quý <?php echo $c_quarter ?>/<?php echo $c_year ?></h2>

	
	<table cellspacing="0" cellpadding="0" border="0" class="table_a formEl_a smpl_tbl">
		<thead>
			<tr>
				<th colspan="3" rowspan="2" width="50%"><?php __('Nội dung hoạt động'); ?></th>
				<th colspan="2">quý <?php echo $c_quarter ?>/<?php echo $c_year-1; ?></th>
				<th colspan="2">quý <?php echo $c_quarter ?>/<?php echo $c_year; ?></th>
			</tr>
			<tr>
				
				<th><?php __('Trường'); ?></th>
				<th><?php __('Học sinh'); ?></th>
				<th><?php __('Trường'); ?></th>
				<th><?php __('Học sinh'); ?></th>
			</tr>			
		</thead>
		<tbody>
			<?php foreach($nhdActivities as $b => $item) { ?>
				<tr>
					<td><?php $i = $b == 0 ? 0 : $b-1; echo $b == 0 ? "ND".$item["NhdActivityCategory"]["nd"] : ''; echo $item["NhdActivityCategory"]["nd"] != $nhdActivities[$i]["NhdActivityCategory"]["nd"] ? "ND".$item["NhdActivityCategory"]["nd"] : ''; ?></td>
					<td><?php $i = $b == 0 ? 0 : $b-1; echo $b == 0 ? $item["NhdActivityCategory"]["name"] : ''; echo $item["NhdActivityCategory"]["name"] != $nhdActivities[$i]["NhdActivityCategory"]["name"] ? $item["NhdActivityCategory"]["name"] : ''; ?></td>
					<td><?php echo $item["NhdActivity"]["name"] ?></td>					
					
					<td align="right">
							<?php echo $item['old']["school_rate"] != '' ? $item['old']["school_rate"] : '0'; ?>%
					</td>
					
					<td align="right">
							<?php echo $item['old']["student_rate"] != '' ? $item['old']["student_rate"] : '0'; ?>%
					</td>
					
					<td align="right">
							<?php echo $item["school_rate"] != '' ? $item["school_rate"] : '0'; ?>%
					</td>
					
					<td align="right">
							<?php echo $item["student_rate"] != '' ? $item["student_rate"] : '0'; ?>%
					</td>
				</tr>
			<?php } ?>		
		</tbody>
	</table>


<!--<div style="text-align: right">(Đơn vị: thiết bị)</div>-->
</div>

<div class="dp100">

	<h2 class="sepH_b">Chi tiết nội dung thực hiện - quý <?php echo $c_quarter ?>/<?php echo $c_year; ?></h2>

	
	<table cellspacing="0" cellpadding="0" border="0" class="table_a formEl_a smpl_tbl">
		<thead>
			<tr>
				<th><?php __('STT'); ?></th>
				<th><?php __('Đơn vị'); ?></th>
				<th><?php __('ND1'); ?></th>
				<th><?php __('ND2'); ?></th>
				<th><?php __('ND3'); ?></th>
				<th><?php __('ND4'); ?></th>
				<?php foreach ($devices as $d) { ?>
						<th><?php echo $d['Device']['name'] ?></th>
				<?php } ?>
			</tr>			
		</thead>
		<tbody>
			<?php foreach($cities as $kc => $item) { ?>
				<tr>
					<td><?php echo $kc+1; ?></td>
					<td><?php echo $item["City"]['name']; ?></td>
					<td><?php echo $item["nd1"] ?></td>
					<td><?php echo $item["nd2"] ?></td>
					<td><?php echo $item["nd3"] ?></td>
					<td><?php echo $item["nd4"] ?></td>
					<?php foreach ($devices as $ddd => $d) { ?>
						<td><?php echo $item['device'][$ddd] ?></td>
				<?php } ?>
				</tr>
			<?php } ?>		
		</tbody>
	</table>
	<ul>
            <li>X: Có thực hiện</li>
	    <li>Ô trắng: Tỉnh chưa báo cáo</li>
	    <li>(*): không đử dữ liệu</li>
            
        </ul>


<!--<div style="text-align: right">(Đơn vị: thiết bị)</div>-->
</div>